home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Languguage OS 2
/
Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO
/
language
/
embedded
/
develop
/
ad2mac.arc
/
TEST11.ASM
< prev
next >
Wrap
Assembly Source File
|
1989-07-27
|
2KB
|
121 lines
ttl HC11 Test Program for AD2MAC
* Test Program for AD2MAC Utility
* Extracts symbol info from 2500AD cross 68HC11 assembler
* listing file (.LST) and produces HDS-300 compatible
* macro file (.MAC) containing local symbol (LS) commands.
*
* BY: Peter S. Gilmour 27 July 1989
control equ $103
srmask equ $80
fcbase equ $204
stmask equ $40
pattern equ $aa
shram equ $200
jmp1 equ $307
jmp1_addr equ jmp1+$1c
.absolute
org $50
count rmb 1 Command count
.relative
org shram
rmb $20
addr rmb 2 Command address
get rmb 2 Get data address
data rmb 80 Command data
rmb 100
stack equ *-1 Stack area
page
org $800
* Here for power up/reset:
start ldaa control
anda #stmask If not power up, then
beq config . enter exec via config cmd!
* Here for self-test:
stest ldab #0
ldaa #pattern
ldx #shram
st_100 staa ,x Test 1st page of shared ram.
cmpa ,x
bne st_err1 Exit if error!
coma Get inverse pattern
bpl st_100 and test same location again!
incb
beq st_100 Continue until entire page is tested!
bra exec Enter executive loop.
* Here for self-test error:
st_err1 ldd #shram
bra * Hang the system.
page
* Here for config command:
config ldaa control
staa shram
nop
* Fall into the exec loop!
* Here for the executive command loop:
exec lds #stack Reset stack pointer.
ldaa control
oraa #srmask
staa control Yield shared ram to FIM.
ex$wait ldaa control
anda #srmask
bne ex$wait Wait for FIM to return shared ram.
ldaa fcbase Get cmd word and verify it, else
bne exec . ignore it!
ldab fcbase+1
cmp #maxfc+1
bhs exec
lslb Get addr of proper routine from table
ldx #ftabl and place into X register.
abx
jsr ,x Go execute the command.
bra exec Return to exec loop.
ftabl fdb rduser
fdb wruser
maxfc equ ((*-ftabl)/2)-1 Maximum legal function code
page
* Here for read user memory command:
rduser jsr cmd.init
rduser1 ldaa 0,x
staa data
inx
inc count
bne rduser1
rts
* Here for write user memory command:
wruser jsr cmd.init
wruser1 ldaa data
staa ,x
inx
inc count
bne wruser1
rts
* Subr. to init for command execution:
cmd.init ldaa addr
staa get
ldaa addr+1
staa get+1
rts
end